#ifndef NODE_H
#define NODE_H
#include <reversi_board.h>
#include <game_engine.h>

enum role { MAX_PLAYER, MIN_PLAYER };
class Action{
public:
    Action();
    Action(int x, int y, int value);
    int m_piece_x;
    int m_piece_y;
    int value;

};

class Node
{
public:
    Node();
    ~Node();
    bool is_final();
    void set_board(ReversiBoard *);
    void set_parent_action(Action *);
    void set_father_node(Node *);
    void set_role(role r);
    void set_color(player c);
    player get_color();
    ReversiBoard* get_board();
    void play(Action *action);

    Action* m_action;
    void print();
    Node backup();
    role get_role();
    void set_board(int *board);
private:
    ReversiBoard *m_board;
    Node* m_father_node;
    role m_player;
    player m_color;
};

#endif // NODE_H
